package com.ww.springboot.boot.util;

import java.util.Date;
import java.util.UUID;

import cn.hutool.core.date.DateUtil;

/**
 * 描述：
 *
 * @author 🧑 ‍wanwei
 * @since 2024-09-10 09:27
 */
public class SnowFlake {

    public static void main(String[] args) {
        Date date = DateUtil.offsetDay(new Date(), -365);
        Long id = ((date.getTime() - 1288834974657L) << 22);
        System.out.println(id);
//
//        date = DateUtil.offsetDay(new Date(), -6);
//        id = ((date.getTime() - 1288834974657L) << 22);
//        System.out.println(id);

        //System.out.println(UUID.randomUUID().toString());
    }
}
